//
// Created on 2024/10/21.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#ifndef OHOS_DEMO_VIDEO_SOURCE_WRAPPER_H
#define OHOS_DEMO_VIDEO_SOURCE_WRAPPER_H
#include "api/media_stream_interface.h"
#include "api/video/video_sink_interface.h"
#include "api/video/video_frame.h"

namespace ohosrtc {

class VideoSourceWrapper : public rtc::VideoSinkInterface<webrtc::VideoFrame> {
  public:
    VideoSourceWrapper(rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> video_source);
    void OnFrame(const webrtc::VideoFrame &frame);
  private:
    rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> video_source_;
};

}

#endif //OHOS_DEMO_OHOS_VIDEO_SOURCE_WRAPPER_H
